package main

import (
	"fmt"
)

/**
 * @author: guangcheng
 * @date:   2020/11/5 11:47
 * @version  V1.0
 * @description:
 *
 */
func main() {

	var x interface{}
	var y = 10.0
	x = y
	switch i := x.(type) {
	case nil:
		fmt.Printf("x类型%T", i)
	case int:
		fmt.Printf("x类型%T", i)
	case float64:
		fmt.Printf("x类型%T", i)
	case func(int) float64:
		fmt.Printf("x类型%T", i)
	case bool, string:
		fmt.Printf("x类型%T", i)
	default:
		fmt.Println("unKnow type")

	}
}
